class DiscoveryTag {
  String name;
  String id;

  DiscoveryTag.fromJson(Map<String, dynamic> json)
      : name = json['tag_name'],
        id = json['tag_id'];
}

class DiscoveryItemEntity {
  String title;
  int type;
  String subTitle;
  String typeName;
  String updateTime;
  List<String> coverUrl;
  DiscoveryAuthor author;

  DiscoveryItemEntity.fromJson(Map<String, dynamic> json)
      : title = json['title'],
      type = json['type'],
      subTitle = json['sub_title'],
      typeName = json['type_name'],
      updateTime = json['update_time'],
      author = DiscoveryAuthor.fromJson(json['author']),
      coverUrl = (json['cover_url'] as List).map<String>((t){
        return t.toString();
      }).toList();
}

class DiscoveryAuthor {
  String avatar;
  String name;

  DiscoveryAuthor.fromJson(Map<String,dynamic> json):name = json['name'],avatar=json['avatar'];
}
